Touch up init, fix missing adapter errors #3483
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #2814
builds off #3474 (I'll rebase after that one is merged)
Description
dbt init
will scaffold~/.dbt/profiles.yml
(if missing) using an adapter-specific profile. Neat! It accepts an--adapter
flag to control which one. If unspecified, it would default toredshift
— even if the Redshift adapter isn't installed. Not so neat.Changes:
redshift
as default for--adapter
. If--adapter
is not specified, use_get_adapter_plugin_names
to grab the set of installed adapters. Pick the first one and use it. (That method is currently indbt.version
, we could move it intodbt.utils
.)sample_profiles.yml
is missing in the selected adapter, don't raise a runtime error, just skip writingprofiles.yml
. Do the same if no adapters are installed.https://community.getdbt.com/
. Previously, it wasThere's a link to our Slack group in the GitHub Readme
(meh). I'm assuming that the new-ish community link is relatively stable, and that if it were to change, we'd do a good job forwarding traffic to account for older versions of dbt. (@annafil Want to check with you first, of course!)Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.